ebooktestfandomcom-20200214-history
How to build Raptor
= Obtaining the source code = The Raptor source code is kept in a Mercurial repository and is part of the Build Package. The URL is http://developer.symbian.org/oss/FCL/sftools/dev/build/ You can simply clone this Mercurial repository using hg clone http://developer.symbian.org/oss/FCL/sftools/dev/build --pull This will create a 'build' folder in your current directory, so move to the directory where you want this placed before running the command. = Repository layout and the branches of Raptor = TODO - add comments about submitting changes/testing? Raptor is found in sbsv2/raptor inside the repository. It is in the same place regardless of which branch of the repository you are viewing. The build repository contains three branches: * default * 'fix' - for defect fixes * 'wip' - feature work in progress Our normal development practice is to make changes in the fix and wip branches as appropriate, and merge these into the default branch after doing sufficient release testing. It's possible to create your own branches but given Mercurial will tend to create a new sub-branch whenever a new set of changes is made, this is rarely necessary. = Setting up the development environment = Once the source repository has been cloned, a few further steps are required in order to get Raptor up and running. These differ between Linux and Windows. In either case, you will have the directory structure build/sbsv2/raptor in the directory where you ran your hg clone command. Linux Set up A Bash shell script called sbs is the command line interface to Raptor. This is located in build/sbsv2/raptor/bin. Ensure that this script and the gethost.sh script (in the same directory) have execute permissions. Next, create an environment variable called SBS_HOME with value /full/path/to/build/sbsv2/raptor ensuring that you have replaced /full/path/to with the full pathname of the directory that contains your build directory. For illustration purposes, assume that the build directory is located in /home/user/hg/build, so that SBS_HOME should be set to /home/user/hg/build/sbsv2/raptor. On Linux you can do this with the command export SBS_HOME=/home/user/hg/build/sbsv2/raptor Next, you need to add $SBS_HOME/bin to your PATH environment variable: export PATH=$SBS_HOME/bin:$PATH Enter sbs -v and you should see an error message like this: Error: sbs has not been installed with support for your platform: "linux unknown libc2_10". The utilites for your platform should be in "/home/user/hg/build/sbsv2/raptor/linux-unknown-libc2_10" but sbs cannot find them there. sbs is supported on: win32 linux i386 libc2_3 (Redhat 4) sbs has been known to work (but is not supported) on: linux x86_64 libc2_5 (e.g. Centos/Redhat 5.3 64-bit) linux i386 libc2_8 (e.g. Fedora 9 32-bit) linux x86_64 libc2_10 (e.g. Fedora 11 64-bit) Even with the appropriate utilities it may be necessary to install 32-bit compatibility versions of some libraries (e.g. glibc) on these platforms, particularly for 3rd party tools which are not built natively such as compilers. It may be possible to build and install the utilities for your platform by entering /home/user/hg/build/sbsv2/raptor/util and running make -k A full development environment is required however. This example was taken from a Ubuntu 9.10 machine. To build the Raptor supporting tools, it is recommended that the following development packages are installed from your package manager (these are the Ubuntu/Debian names): libncursesw5-dev libreadline5-dev libssl-dev libgdbm-dev libbz2-dev libc6-dev libsqlite3-dev libgdbm-dev libreadline5-dev tcl8.4-dev tk8.4-dev Python is the main tool that depends on these development packages. Installing these ensures that almost all the Python modules are built. Once you have installed these (as necessary), change directory to /home/user/hg/build/sbsv2/raptor/util and run make -k. This will build supporting utilities for Raptor. If you see any errors about packages not being found, you will have to install the development version of these for make to be able to succeed. Windows Set up The setup for Windows is a little different and requires to set multiple additional env Variable. First you need to set the SBS_HOME environment variable to point to the folder which contains Raptor's bin directory. It is also acceptable to have no SBS_HOME environment variable set at all, unless you want to remake Talon. set SBS_HOME=C:\cf0c187b284a\sbsv2\raptor Then you need to add sbs into the Path: set PATH=C:\cf0c187b284a\sbsv2\raptor\bin;%PATH% Raptor requires Cygwin (at least 1.5), Python (at least 2.6) and MinGW (at least 3.4.5) installed. They can be on the path, but must be pointed to by environment variables as described here. Cygwin 1.7 requires that SBS_CYGWIN17 is set and points to the root of the Cygwin 1.7 installation. At a DOS command shell, type sbs -v to see if it works. If you get an error, please follow the troubleshooting tips. Notice: If you install your own MinGW on your Windows machine for use with Raptor, make sure to selcect the installation of the optional package Make and g++ Arm Tool Chain Set Up By tool chain, we mean the compilers and linkers and their supporting tools. Raptor supports the RVCT and GCCE tool chains. By default, the RVCT tool chain requires certain environment variables to be available. For example, RVCT 2.2 uses at least these environment variables: RVCT22BIN RVCT22INC RVCT22LIB plus one to two for license settings. It is assumed that you have installed and configured RVCT appropriately for your network. At the time of writing, Raptor automatically detects the following versions of RVCT: 2.2, 3.1 and 4.0 from the environment variables set by the RVCT installers (or on Linux from certain shell scripts). For GCCE, it is necessary for the user to set several environment variables to tell Raptor that versions of GCCE are installed. The reason for this is that the GCCE installers do not set any special environment variables other than optionally the PATH and it can convenient to switch between versions of GCCE in Raptor builds. Releases pre-2.11.1 Manually set the GCCEBIN environment variable to the bin directory inside your GCCE installation. Releases starting 2.11.1 onwards Manually set the following environment variable to the bin directories inside your GCCE installations. SBS_GCCE432BIN SBS_GCCE433BIN SBS_GCCE441BIN For example, on Linux, you might have have the following: SBS_GCCE432BIN=/opt/symbian/GCCE432/arm-2008q3/bin SBS_GCCE433BIN=/opt/symbian/GCCE433/arm-2009q1/bin SBS_GCCE441BIN=/opt/symbian/GCCE441/arm-2009q3/bin In this case, the directory names also indicate the corresponding CodeSourcery release of GCCE. As a general convention in Raptor, any environment variable that Raptor is sensitive to, but that a user has to set themselves manually will have the prefix "SBS_", as in the example of the SBS_GCCE***BIN environment variables. Conversely, the RVCT installers (or shell scripts) set the appropriate environment variables for the user, so they do not have the "SBS_" prefix. Remaking Talon Talon is a shell wrapper that calls build processes. In general you will not need to remake this as it's updated with each release so this is only needed if you change it. To make Talon: # Ensure SBS_HOME is set correctly to the raptor directory # Change to the $SBS_HOME/util directory # On Windows: ## Ensure SBS_MINGW is set to point to your MinGW installation (at least MinGW 3.4.5 is required) # execute make talon. Category:Raptor Build System